1. Technical Field
The present invention relates to an image processing apparatus that performs matching processing based on a model image set in advance with respect to a measurement image that is obtained by imaging an object.
2. Related Art
In a field of FA (Factory Automation), a so-called visual sensor has come into practical use as an apparatus for visually inspecting defect of an object to be measured such as a workpiece and recognizing characters printed on a surface thereof. As a typical example of a method for performing such inspection and recognition process, matching processing based on a previously set model image is generally known (for example, Japanese Unexamined Patent Publication No. 11-085907).
In this matching processing, a measurement image (measurement image) is obtained by imaging an object such as a product immediately before shipment and a half-finished product in manufacturing process, and search processing is executed to find a region with the highest degree of similarity (typically, correlation value) between the previously set model image and the measurement image. Therefore, the matching processing is also referred to as search processing.
In an actual production line, an imaging position of a workpiece flowing thereon may be slightly displaced, and a lighting environment may vary. Even when such disturbance factors arise, it is necessary to perform the matching processing in a stable manner. Therefore, when the above visual sensor is actually applied to the production line, what kind of model image is selected is important.
In reality, a skilled worker sets the model image based on his or her experience. More specifically, a certain model image is set first, and the matching processing is performed on the actually obtained measurement image based on this set model image. If a result of the matching processing is not preferable, the model image is changed to another model image. This operation is repeated, so that a model image that is considered to be optimum is ultimately selected. Therefore, operation for searching a model image is recurrently repeated until a stable matching result is obtained. Consequently, there is a problem in that it takes an enormous amount of time and effort to select the model image. In addition, there is a problem in that the visual sensor cannot be actually operated during this selection of the model image.
In reality, it is almost impossible in terms of time and cost to completely confirm that the matching processing can be stably performed with the selected model image on all of the work pieces flowing in the production line. Therefore, there is no other way but to employ the model image whose stability is merely confirmed with respect to only a limited number of measurement images. For this reason, after the operation starts, it may be determined that stable matching processing cannot be performed with the selected model image.
Further, because of difference in the skill of the worker or the like, there is inconsistency in determining what kind of model image is retrieved from the original image or performing operation for selecting one of the model images.
The present invention is made in order to solve the above problems, and an object of the present invention is to provide a model image acquisition support apparatus, a model image acquisition support method, and a model image acquisition support program that can easily and swiftly obtain an optimum model image for an image processing apparatus that performs matching processing based on a model image set in advance with respect to a measurement image that is obtained by imaging an object.